package com.glzn.springboot03.mapper;

import com.glzn.springboot03.entity.Mqtt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Lenovo
 */
@Mapper
public interface MqttMapper {
	/**
	 * 根据id查找mqtt
	 * @param id
	 * @return
	 */
	@Select("SELECT * FROM mqtt WHERE id=#{id}")
	Mqtt findById(Integer id);

	/**
	 * 查询所有的mqtt device
	 * @return
	 */
	@Select("SELECT * FROM mqtt")
	List<Mqtt> findAll();
}
